using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class investigation_answerMap : EntityTypeConfiguration<investigation_answer>
    {
        public investigation_answerMap()
        {
            // Primary Key
            this.HasKey(t => t.answer_id);

            // Properties
            this.Property(t => t.answer_option_10)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.answer_option_1)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_2)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_3)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_4)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_5)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_6)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_7)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_8)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_9)
                .HasMaxLength(50);

            this.Property(t => t.answer_option_11)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("investigation_answer");
            this.Property(t => t.answer_option_10).HasColumnName("answer_option_10");
            this.Property(t => t.answer_id).HasColumnName("answer_id");
            this.Property(t => t.answer_option_1).HasColumnName("answer_option_1");
            this.Property(t => t.answer_option_2).HasColumnName("answer_option_2");
            this.Property(t => t.answer_option_3).HasColumnName("answer_option_3");
            this.Property(t => t.answer_option_4).HasColumnName("answer_option_4");
            this.Property(t => t.answer_option_5).HasColumnName("answer_option_5");
            this.Property(t => t.answer_option_6).HasColumnName("answer_option_6");
            this.Property(t => t.answer_option_7).HasColumnName("answer_option_7");
            this.Property(t => t.answer_option_8).HasColumnName("answer_option_8");
            this.Property(t => t.answer_option_9).HasColumnName("answer_option_9");
            this.Property(t => t.investigation_question_id).HasColumnName("investigation_question_id");
            this.Property(t => t.answer_option_11).HasColumnName("answer_option_11");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
        }
    }
}
